

function favorite(host_id){
	var url = $("#contentpath").val()+"/FavoriteServlet.do";
	///alert(host_id);
	$.post(url,
		  {host_id:host_id},
		  function(result){
		alertDialog(result);
		if(result.indexOf("成功")!=-1){
			$("#"+host_id+"_fav").text("已收藏");
			$("#"+host_id+"_fav").attr("onclick","");
			$("#"+host_id+"_fav").css("color","red");
			$("#"+host_id+"_fav").css("font-size","10px");
		}else if(result.indexOf("超时")!=-1){
			window.location.href=$("#contentpath").val()+"/index.jsp";
		}else if(result.indexOf("已经")!=-1){
			$("#"+host_id+"_fav").text("已收藏");
			$("#"+host_id+"_fav").attr("onclick","");
			$("#"+host_id+"_fav").css("color","red");
			$("#"+host_id+"_fav").css("font-size","10px");
		}
	  });
}

function blacklist(host_id){
	//BlackListServlet.do
	//alert(host_id); 
	var url = $("#contentpath").val()+"/BlackListServlet.do"; 
	///alert(host_id);
	$.post(url,
		  {host_id:host_id},
		  function(result){
		alertDialog(result);
		if(result.indexOf("成功")!=-1){
			$("#"+host_id+"_bla").text("已拉黑");
			$("#"+host_id+"_bla").attr("onclick","");
			$("#"+host_id+"_bla").css("color","red");
			$("#"+host_id+"_bla").css("font-size","10px");
		}else if(result.indexOf("超时")!=-1){
			window.location.href=$("#contentpath").val()+"/index.jsp";
		}else if(result.indexOf("已经")!=-1){
			$("#"+host_id+"_bla").text("已拉黑");
			$("#"+host_id+"_bla").attr("onclick","");
			$("#"+host_id+"_bla").css("color","red");
			$("#"+host_id+"_bla").css("font-size","10px");
		}
	  });
}

function report(host_id){
	var dialog = art.dialog({id: 'N3690',title: false});
	// jQuery ajax   
	$.ajax({
	    url: $("#contentpath").val()+'/common/report.jsp?host_id='+host_id, 
	    success: function (data) {
			//alertDialog(data);
	        dialog.content(data);
	    },
	    cache: false
	});
	
}
function submitData(){
		alert("fdsa");
	}
function alertDialog(content){
	var dialog = art.dialog({
	    title: '警告',
		content: content,
		icon: 'warning',
		lock: true,
		opacity: 0.50,	// 透明度
		fixed: true
	});
}